<!-- 目标达成统计 -->
<template>
  <div class="goal-reach-report flex">
    <!--组织架构-->
    <div class="org-tree">
      <organization ref="organ" @onSearch="searchFun" :level="3"></organization>
    </div>
    <!--内容-->
    <div class="content">
      <goal-reach-table ref="goalReachTable" />
    </div>
    <dt-loading :loading="loading" />
  </div>
</template>

<script>
  import organization from '@/components/organzation.vue'
  import goalReachTable from '@/views/casemanagement/report/goalReach/components/goalReachTable.vue'
  export default {
    components: { organization, goalReachTable },
    data() {
      return {
        orgCheck: null,
        loading: true
      }
    },
    methods: {
      searchFun(orgCheck) {
        if (orgCheck) {
          this.$refs.goalReachTable.init(orgCheck)
          this.$refs.goalReachTable.onChangeTab('CLUETARGET')
        }
        this.loading = false
      }
    },
    mounted() {
      this.$refs.goalReachTable.fromPage = 'company'
    }
  }
</script>
<style lang="scss" scoped>
  .goal-reach-report {
    padding: 20px;
    .content {
      width: calc(100% - 260px);
      padding: 20px 0;
    }
  }
</style>
